<!DOCTYPE html>
<html lang="zxx">

	<head>
		<title>长沙网商装饰后台</title>
		<!-- custom-theme -->
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="keywords" content="Esteem Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template,
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
		<script type="application/x-javascript">
			addEventListener("load", function() {
				setTimeout(hideURLbar, 0);
			}, false);

			function hideURLbar() {
				window.scrollTo(0, 1);
			}
		</script>
		<!-- //custom-theme -->
		<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all" />
		<link rel="stylesheet" type="text/css" href="css/table-style.css" />
		<link rel="stylesheet" type="text/css" href="css/basictable.css" />
		<link href="css/component.css" rel="stylesheet" type="text/css" media="all" />
		<link href="css/style_grid.css" rel="stylesheet" type="text/css" media="all" />
		<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
		<!-- font-awesome-icons -->
		<link href="css/font-awesome.css" rel="stylesheet">
		<!-- //font-awesome-icons -->
		<link href="//fonts.googleapis.com/css?family=Open+Sans:300,300i,400,400i,600,600i,700,700i,800" rel="stylesheet">
	</head>

	<body>
		<!-- banner -->
		<div class="wthree_agile_admin_info">
			<!-- /w3_agileits_top_nav-->
			<!-- /nav-->
			<div class="w3_agileits_top_nav">
				<ul id="gn-menu" class="gn-menu-main">
					<!-- /nav_agile_w3l -->

					<!-- //nav_agile_w3l -->
					<li class="second logo">
						<h1><a href="#"><i class="fa fa-graduation-cap" aria-hidden="true"></i>长沙网商装饰</a></h1></li>

					<li class="second top_bell_nav">
					</li>
				</ul>
				<!-- //nav -->

			</div>
			<div class="clearfix"></div>
			<!-- //w3_agileits_top_nav-->

			<!-- /inner_content-->
			<div class="inner_content">

				<div class="inner_content_w3_agile_info two_in">
					<br>
					<div class="agile-tables">
						<div class="w3l-table-info agile_info_shadow">
							<h3 class="w3_inner_tittle two">用户留言</h3>
							<table id="table">

								<thead>
									<tr>
										<th>姓名</th>
										<th>手机号码</th>
										<th>时间</th>
									</tr>
								</thead>
								<tbody id="commentData">

								</tbody>
							</table>

						</div>

						<div class="inner_content_w3_agile_info two_in">
							<br>

							<div class="agile-tables">
								<div class="w3l-table-info agile_info_shadow">
									<h3 class="w3_inner_tittle two">大转盘抽奖</h3>
									<table id="table">
										<thead>
											<tr>
												<th>姓名</th>
												<th>手机号码</th>
												<th>内容</th>
												<th>时间</th>
											</tr>
										</thead>
										<tbody id="turntableData">

										</tbody>
									</table>

								</div>

							</div>
							<!-- //inner_content_w3_agile_info-->
						</div>
						<!-- //inner_content-->
						<!--copy rights start here-->
						<div class="copyrights">
							<p>© 2017 Esteem. All Rights Reserved | Design by
								<a href="http://www.cswszs" target="_blank">腾慧科技</a>
							</p>
						</div>
						<!--copy rights end here-->
						<!-- js -->

						<script type="text/javascript" src="js/jquery-2.1.4.min.js"></script>
						<script type="text/javascript" src="js/jquery.cookie.js"></script>
						<script src="js/modernizr.custom.js"></script>

						<script src="js/classie.js"></script>
						<script src="js/gnmenu.js"></script>
						<script>
							new gnMenu(document.getElementById('gn-menu'));
						</script>
						<!-- tables -->

						<script type="text/javascript" src="js/jquery.basictable.min.js"></script>
						<script type="text/javascript">
							$(document).ready(function() {
								$('#table').basictable();

								$('#table-breakpoint').basictable({
									breakpoint: 768
								});

								$('#table-swap-axis').basictable({
									swapAxis: true
								});

								$('#table-force-off').basictable({
									forceResponsive: false
								});

								$('#table-no-resize').basictable({
									noResize: true
								});

								$('#table-two-axis').basictable();

								$('#table-max-height').basictable({
									tableWrapper: true
								});
							});
						</script>
						<!-- //js -->
						<script src="js/screenfull.js"></script>
						<script>
							$(function() {
								$('#supported').text('Supported/allowed: ' + !!screenfull.enabled);

								if(!screenfull.enabled) {
									return false;
								}

								$('#toggle').click(function() {
									screenfull.toggle($('#container')[0]);
								});

							});

							var cookieId = $.cookie('user');
							console.log(cookieId);

							if(cookieId != "admin") {
								console.log("fdsfds");
								window.location.href = './login.html';
							}

							$.ajax({
								url: 'http://api.cswszs.com/comment/getComment',
								type: 'POST', //GET
								async: true, //或false,是否异步
								data: {},
								timeout: 5000, //超时时间
								dataType: 'json',
								success: function(data, textStatus, jqXHR) {
									if(data.code == 200) {
										//这里拿到了数据
										for(var i = 0; i < data.data.length; i++) {
											var obj = data.data[i]
											console.log(obj);
											var html = "<tr><td>" + obj.name + "</td><td>" + obj.phone_num + "</td><td>" + obj.create_time + "</td></tr>"
											$("#commentData").append(html);
										}
									}
								}
							});

							$.ajax({
								url: 'http://api.cswszs.com/comment/getTurntable',
								type: 'POST', //GET
								async: true, //或false,是否异步
								data: {},
								timeout: 5000, //超时时间
								dataType: 'json',
								success: function(data, textStatus, jqXHR) {
									if(data.code == 200) {
										//这里拿到了数据
										for(var i = 0; i < data.data.length; i++) {
											var obj = data.data[i]
											console.log(obj);
											var html = "<tr><td>" + obj.name + "</td><td>" + obj.phone_num + "</td><td>" + obj.content + "</td><td>" + obj.create_time + "</td></tr>"
											$("#turntableData").append(html);
										}
									}
								}
							});
						</script>
						<script src="js/jquery.nicescroll.js"></script>
						<script src="js/scripts.js"></script>

						<script type="text/javascript" src="js/bootstrap-3.1.1.min.js"></script>

	</body>

</html>